<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:p="http://primefaces.org/ui"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets">

	<h:head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
	</h:head>

	<h:body>
		  <ui:composition template="/WEB-INF/facelets/template.xhtml">	
		 
		 	<ui:define name="body">	
				<f:view>
					<p:ajaxStatus onstart="statusDialog.show();" onsuccess="statusDialog.hide();"/>               
					<p:dialog modal="true" widgetVar="statusDialog" header="Loading"  draggable="false" closable="false">  
   						<p:graphicImage value="#{facesContext.externalContext.request.scheme}://#{facesContext.externalContext.request.serverName}:#{facesContext.externalContext.request.serverPort}#{facesContext.externalContext.request.contextPath}/images/ajaxloadingbar.gif" />   
					</p:dialog>
		  			<h:form id="frm">								  		
						
						<p:panel id="panelDataTableAnxsXArea" header="AnxsXAreaData">
							<p:growl id="men"/>				
							<p:dataTable value="#{anxsXAreaView.data}" var="anxsXArea"
								paginator="true" rows="5">
																										<p:column filterBy="#{anxsXArea.idAnxXArea}" sortBy="#{anxsXArea.idAnxXArea}" >
										 <f:facet name="header">
										<h:outputText value="idAnxXArea"/>
										</f:facet>
										 <h:outputText value="#{anxsXArea.idAnxXArea}"/>
										 </p:column>
			                    																									
										<p:column filterBy="#{anxsXArea.esObligatorio}" sortBy="#{anxsXArea.esObligatorio}" >
										 <f:facet name="header">
										<h:outputText value="EsObligatorio"/>
										</f:facet>
										 <h:outputText value="#{anxsXArea.esObligatorio}"/>
										</p:column>   
			                    									
										<p:column filterBy="#{anxsXArea.idAnexoPqr_AnexosPqr}" sortBy="#{anxsXArea.idAnexoPqr_AnexosPqr}" >
										 <f:facet name="header">
										<h:outputText value="IdAnexoPqr_AnexosPqr"/>
										</f:facet>
										 <h:outputText value="#{anxsXArea.idAnexoPqr_AnexosPqr}"/>
										</p:column>   
			                    									
										<p:column filterBy="#{anxsXArea.idAreaInvolucrada_AreasInvolucradas}" sortBy="#{anxsXArea.idAreaInvolucrada_AreasInvolucradas}" >
										 <f:facet name="header">
										<h:outputText value="IdAreaInvolucrada_AreasInvolucradas"/>
										</f:facet>
										 <h:outputText value="#{anxsXArea.idAreaInvolucrada_AreasInvolucradas}"/>
										</p:column>   
			                    			                    
								<p:column headerText="Options">
									<p:commandButton id="btnEdit" icon="ui-icon-pencil"
										update=":dialogAnxsXArea"
										actionListener="#{anxsXAreaView.action_edit}">
										<f:attribute name="selectedAnxsXArea" value="#{anxsXArea}" />
									</p:commandButton>
									<p:commandButton id="btnDelete"									
										title="Delete" actionListener="#{anxsXAreaView.action_delete_datatable}"
										onclick="if(!confirm('Do you really want to delete this Entry?')){return false;}"
										icon="ui-icon-trash" update="@form">
										<f:attribute name="selectedAnxsXArea" value="#{anxsXArea}" />
									</p:commandButton>
								</p:column>									                    
							</p:dataTable>	
						</p:panel>
						<p:panel id="panelBoton">
							<div align="center">
								<p:commandButton id="btnNew" value="New"
									action="#{anxsXAreaView.action_new()}" update=":dialogAnxsXArea" />
							</div>
						</p:panel>						
		   			</h:form>
					<p:dialog id="dialogAnxsXArea" appendToBody="true" draggable="true"
						closable="false" visible="#{anxsXAreaView.showDialog}" resizable="false"
						modal="true" width="500">
						<h:form id="formDialog">
							<p:messages id="msg" showDetail="true"/>
							<p:panel id="panelAnxsXArea" header="AnxsXArea">							
							    <h:panelGrid columns="2" id="panelGrid" >
																		 <h:outputText id="msgIdAnxXArea" value="IdAnxXArea"/>
									 <p:inputText id="txtIdAnxXArea" binding="#{anxsXAreaView.txtIdAnxXArea}">
									 <p:ajax update=":dialogAnxsXArea" listener="#{anxsXAreaView.listener_txtId}"/>
									 </p:inputText>	
																											
																		<h:outputText id="msgEsObligatorio" value=" EsObligatorio"/>
									<p:inputText id="txtEsObligatorio" disabled="true" binding="#{anxsXAreaView.txtEsObligatorio}"/>
																		<h:outputText id="msgIdAnexoPqr_AnexosPqr" value=" IdAnexoPqr_AnexosPqr"/>
									<p:inputText id="txtIdAnexoPqr_AnexosPqr" disabled="true" binding="#{anxsXAreaView.txtIdAnexoPqr_AnexosPqr}"/>
																		<h:outputText id="msgIdAreaInvolucrada_AreasInvolucradas" value=" IdAreaInvolucrada_AreasInvolucradas"/>
									<p:inputText id="txtIdAreaInvolucrada_AreasInvolucradas" disabled="true" binding="#{anxsXAreaView.txtIdAreaInvolucrada_AreasInvolucradas}"/>
																		
																    </h:panelGrid>
							</p:panel>						   
							<p:panel id="panelBotones">
								<div align="center">					
									<p:commandButton id="btnSave" binding="#{anxsXAreaView.btnSave}" value="Save" action="#{anxsXAreaView.action_save()}" update=":dialogAnxsXArea :frm:panelDataTableAnxsXArea" />
									<p:commandButton id="btnClear" value="Clear" action="#{anxsXAreaView.action_clear()}" update=":dialogAnxsXArea" />
									<p:commandButton id="btnExit" value="Exit" action="#{anxsXAreaView.action_closeDialog()}" update=":dialogAnxsXArea" />
								</div>
							</p:panel>					
						</h:form>
					</p:dialog>
				</f:view>
			</ui:define>		
		</ui:composition>	
	</h:body>	
</html>	